package com.endlessblue.visa;


import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

/**
 * 项目启动入口 
 * @author tanquan
 */
@SpringBootApplication
@MapperScan(basePackages={"com.endlessblue.visa.mapper"})
@ComponentScan(basePackages={"com.endlessblue.visa"})
@EnableAutoConfiguration
public class Application extends SpringBootServletInitializer {
	
	private final static Logger logger = LoggerFactory.getLogger(Application.class);

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(Application.class);
	}

	public static void main(String[] args) {
		System.setProperty(net.sf.ehcache.CacheManager.ENABLE_SHUTDOWN_HOOK_PROPERTY,"true");
		SpringApplication.run(Application.class, args);
		logger.info("【项目visa启动成功......】");
	}
	
}
